Skip to content

fix(place): handle European decimal comma in review counts#68

Open
MozzamShahid wants to merge 1 commit into
508-dev:mainfrom
MozzamShahid:fix-review-count-decimal-comma
Open

fix(place): handle European decimal comma in review counts#68
MozzamShahid wants to merge 1 commit into
508-dev:mainfrom
MozzamShahid:fix-review-count-decimal-comma

Conversation

@MozzamShahid

@MozzamShahid MozzamShahid commented Jul 15, 2026

Copy link
Copy Markdown

Closes #52

Summary by CodeRabbit

  • Bug Fixes

    • Improved review-count parsing for international number formats, including comma-based decimals and thousands separators.
    • Added support for common magnitude suffixes such as K, M, 万, and 萬.
    • Review counts are now calculated more accurately from varied source formats, reducing incorrect or missing values.
  • Tests

    • Expanded coverage for regional formatting and suffix combinations.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1bd3606e-03dc-4e2d-9c75-1dd901f32595

📥 Commits

Reviewing files that changed from the base of the PR and between be34738 and bbd5e1b.

📒 Files selected for processing (2)
  • src/gmaps_scraper/place_scraper.py
  • tests/test_place_scraper.py

📝 Walkthrough

Walkthrough

Updated _parse_review_count to handle decimal commas alongside magnitude suffixes and expanded unit coverage for comma, decimal, grouping, and localized suffix formats.

Changes

Review count parsing

Layer / File(s) Summary
Suffix-aware numeric parsing and validation
src/gmaps_scraper/place_scraper.py, tests/test_place_scraper.py
_parse_review_count now distinguishes decimal commas from grouping commas when suffixes are present, with tests covering K, , decimal, and grouped formats.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: michaelmwu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change to review-count parsing for decimal commas.
Linked Issues check ✅ Passed The parser now handles decimal-comma review counts with suffixes and the tests cover the localized cases from issue #52.
Out of Scope Changes check ✅ Passed The changes stay focused on review-count parsing and its tests, with no unrelated code modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: European decimal comma in review counts parsed incorrectly

1 participant